﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="ListStaff.aspx.cs" Inherits="Admin_Staff_ListStaff" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
 <h1>View Staff</h1>

    <asp:HyperLink ID="HyperLink3" runat="server"
        NavigateUrl="~/Admin/Staff/AddStaff.aspx">New Staff</asp:HyperLink>
    &nbsp;|
    <asp:HyperLink ID="HyperLink2" runat="server"
        NavigateUrl="~/Admin/Staff/ListStaff.aspx">View Staff</asp:HyperLink>
    <br />
    <p>
    <asp:GridView ID="gvStaff" runat="server" Width="100%" AutoGenerateColumns="False"
        CellPadding="4" ForeColor="#333333" GridLines="Vertical">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" />
            <asp:BoundField DataField="Username" HeaderText="Name" />
            <asp:TemplateField HeaderText="Role">
                <ItemTemplate>
                    <asp:Label ID="lbl" runat="server" Text='<%# Eval("tblRole.Role") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
                        <asp:TemplateField HeaderText="Branch">
                <ItemTemplate>
                    <asp:Label ID="lbl" runat="server" Text='<%# Eval("tblBranch.Name") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:HyperLink ID="linkEdit" runat="server" NavigateUrl='<%# String.Format("~/Admin/Staff/EditStaff.aspx?staffid={0}",Eval("ID")) %>'
                        Text="Edit Branch"></asp:HyperLink>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# String.Format("~/Admin/Staff/AdminChangePassword.aspx?staffid={0}",Eval("ID")) %>'
                        Text="Edit Password"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
</asp:Content>
